
/*轮播图*/
var currentPic = 0;//表示当前正在显示的图片的序号
//定义方法 移动到下一张图片
function autoMove () {
  currentPic = currentPic + 1;
  if (currentPic == 4) {
    currentPic = 0;
  }
  if (currentPic == -1) {
    currentPic = 3;
  }
  $("button").removeClass("bgGreen");
  $("button").eq(currentPic).addClass("bgGreen");
  $(".ul_img").animate({ "left": (-700 * currentPic) + "px" }, 500);
}
var flag = setInterval(autoMove, 2000);
$(".div_img").hover(function () {
  clearInterval(flag);
}, function () {
  flag = setInterval(autoMove, 2000);
});
$("button").hover(function () {
  $(":animated").stop(true);
  $("button").removeClass("bgGreen");
  $(this).addClass("bgGreen");
  currentPic = $(this).text() - 2;
  autoMove();
})
$(".rightArror").click(function () {
  $(":animated").stop(true);
  autoMove();
})
$(".leftArror").click(function () {
  $(":animated").stop(true);
  currentPic = currentPic - 2;
  autoMove();
})